package project.base.common.database

import org.slf4j.LoggerFactory
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource

/**
 * 动态数据源
 * @author 三味
 * @since 2022/3/2 20:24
 */
class DynamicDataSource : AbstractRoutingDataSource() {
    override fun determineCurrentLookupKey(): Any? {
        return DbContextHolder.getDataSource()
    }

}
